package com.shopee;

/**
 * 最大堆
 */
public class MaxHeap {

    /**
     * 长度为5的最大堆 0元素暂时不用
     * @param args
     */
    private int[] head = new int[6] ;

    private int curSize = 1 ;

    public static void main(String[] args) {

    }

    public void insertData(int num){

        if (curSize < 6){
            head[curSize] = num ;
            curSize ++ ;
            return;
        }
        int i = curSize ;

        while ( i != 1 && num > head[i]){

        }

    }
}
